<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Dessert House - 会员</title>
<link href="/ChristineCake/css/Management_List_Button.css"
	rel="stylesheet" type="text/css" />
</head>

<body>

	<div id="header">
		<div id="logo">
			<img src="/ChristineCake/image/logo.png" alt="logo" width="100%"
				height="100%" />
		</div>
		<div id="logout" align="right">
			<a href="/ChristineCake/jsp/LogIn.jsp">登出</a>
		</div>
	</div>

	<div id="menu">
		<ul>
			<li><a href="
			<%
			out.println("/ChristineCake/OrderGoodsServlet?name=" + request.getParameter("name") + "&date=day1");
			%>
			">预定</a></li>
			<li><a
				href="
			<%out.println("/ChristineCake/OrderListServlet?name="
					+ request.getParameter("name"));%>
			">购物车</a></li>
			<li><a
				href="
			<%
			out.println("/ChristineCake/ConsumptionRecordServlet?name=" + request.getParameter("name"));
			%>
			">消费记录</a></li>
			<li><a
				href="
			<%
			out.println("/ChristineCake/MemberMessageManagementServlet?name=" + request.getParameter("name"));
			%>
			">账户管理</a></li>
		</ul>
	</div>

	<div id="panel">
		<div id="list">
			<ul>
				<li id="listhead">账户管理</li>
				<li><a
					href="
				<%out.println("/ChristineCake/MemberMessageManagementServlet?name="
					+ request.getParameter("name"));%>
				">个人信息管理</a></li>
				<li><a
					href="
				<%out.println("/ChristineCake/RechargeServlet?name="
					+ request.getParameter("name"));%>
				">账户充值</a></li>
				<li><a
					href="
				<%out.println("/ChristineCake/LogOffServlet?name="
					+ request.getParameter("name"));%>
				">账户停用</a></li>
			</ul>
		</div>

		<div id="content">
			<jsp:useBean id="member" type="model.Member" scope="request" />

			<br /> <br /> <br /> <br /> 您当前的账户余额为：
			<jsp:directive.page import="java.util.Calendar" />
			<%
				if (member.getBalance() == -1) {
					out.println("您尚未激活！请充值100元以激活！");
				} else if (Calendar.getInstance().getTimeInMillis()
						- member.getLastRecharge().getTime() > 365 * 24 * 3600 * 1000L) {
					out.println("您的会员卡已暂停！请尽快充值！");
				} else {
					out.println(member.getBalance() + " 元");
				}
			%>
			<br /> <br /> <br />
			<form method="POST"
				action="/ChristineCake/RechargeServlet?name=<jsp:getProperty name="member" property="name" />">
				请输入充值金额： <br /> <br /> <input type="text" name="money" size="20%">&nbsp;&nbsp;元
				<br /> <br /> <br /> <input type="submit" name="recharge"
					value="充值" size="20%" class="button">&nbsp;
			</form>
		</div>
	</div>

	<hr />

	<div id="footer">
		<p>©南京大学软件学院 李冰洁</p>
	</div>

</body>

</html>